#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2016-11-06 20:26:56
# @Author  : guoben (guoben.ly@qq.com)
# @Link    : https://git.oschina.net/guoben

import cv2
import numpy as np


if __name__ == "__main__":
    img = np.zeros((512, 512, 3), np.uint8)
    cv2.line(img, (0, 0), (511, 511), (255, 255, 255), 1)
    cv2.circle(img, (255, 255), 55, (0, 0, 255), 1)
    cv2.ellipse(img, (256, 256), (100, 50), 0, 0, 180, 255, -1)
    cv2.putText(img, 'OpenCV', (100, 100),
                cv2.FONT_HERSHEY_SIMPLEX, 4, (255, 255, 255), 2)
    cv2.imshow('line', img)
    print img.shape
    cv2.waitKey(0) & 0xff
    cv2.destroyAllWindows()
